// ==UserScript==
// @name           xkcd-show-title
// @namespace      xtrochu
// @include        http://xkcd.com/*
// ==/UserScript==

(function () {
	for each (var div in document.getElementsByClassName("s")) {
		var imgs = div.getElementsByTagName("img");
		if (imgs.length == 1) {
			var img = imgs[0];

			var ndiv = document.createElement("div");
			ndiv.style.fontVariant = "normal";
			ndiv.style.border = "1px solid rgb(155, 155, 35)";
			ndiv.style.backgroundColor = "rgb(255, 255, 235)";
			ndiv.style.MozBorderRadius = "8px";
			ndiv.appendChild(document.createTextNode(img.title));
			img.parentNode.insertBefore(ndiv, img.nextSibling);

			// return ;
		}
	}

})()
